//
//  FirstViewController.h
//  KeYin
//
//  Created by Sean Chen on 5/26/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Three20/Three20.h"
#import "extThree20JSON/extThree20JSON.h"
#import "PeriodicalTableViewController.h"
#import "DetailViewController.h"
#import "ContentViewController.h"
#import "ProcessViewController.h"
#import "M13FileManager.h"

@interface FeaturedViewController : PeriodicalTableViewController <UIAlertViewDelegate> {
    NSDictionary *magazine;
    NSMutableArray *periodicals;
    NSUInteger loadingPageIndex;
    NSUInteger selectedPeriodicalIndex;
    ProcessViewController *processViewController;
    
    NSInteger pageIdx;
    NSInteger pageSize;
    BOOL hasMore;
}

@property (nonatomic, retain) NSDictionary *magazine;
@property (nonatomic, retain) NSMutableArray *periodicals;
@property (nonatomic, assign) NSUInteger loadingPageIndex;
@property (nonatomic, assign) NSUInteger selectedPeriodicalIndex;
@property (nonatomic, retain) ProcessViewController *processViewController;;

- (id)initWithMagazine:(NSDictionary *)dict;

- (void)loadWithPolicy:(TTURLRequestCachePolicy)policy;

- (void)downloadSelectedPeriodical;
- (void)readSelectedPeriodical;

@end
